package org.kd.common.base.controller;

import org.kd.common.ResponseAPI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;

public class BaseController {
	@Autowired
	protected ResponseAPI responseAPI;
	@Value("${sys.webPath}")
	String webPath;
	@Value("${sys.imgPath}")
	String imgPath;
	public static final String SUCCESS = "success";
	public static final String ERROR = "error";
	public static final String ERRORCODE = "500";
	public static final Integer SUCCESS_CODE = 200;

	/**
	 * @功能: 所有的子类方法执行之前都要先执行此方法，子类方法不需要在model此方法中的参数  aop
	 * @作者: 柯栋 @代号:隐无为 
	 * @param model
	 */
	@ModelAttribute
	public void init(Model model) {
		model.addAttribute("webPath", webPath);
		System.err.println(webPath);
		model.addAttribute("imgPath", imgPath);
	}

	

	
}
